package cqut;
public class test  {
    public static void main(String[] args)  {
      Cat cat=new Cat();
      Dog dog=new Dog();
      System.out.println(dog.getState());
      dog.start();
      cat.start();
      System.out.println(dog.getState());
    String s;
        System.out.println(s);
}
}
class Cat extends Thread  {
    int i=0;
    Cat() {
    }
    public void run() {
        while (i<10) {
            this.say();
                try {
                    Thread.sleep(100L);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                i++;
            }
        }
    public void say() {System.out.println("喵喵喵");}
}
class Dog extends Thread {
    int i=0;
    Dog() {
    }
    public void run() {
        while(i<10) {
            i++;
            this.say();
            try {
                Thread.sleep(100L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
    public void say() {
        System.out.println("汪汪汪......");
    }
}
